package LuoGu.入门.压缩技术;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int [] ans = new int [n*n];
        List<Integer> temp = new ArrayList<>();
        int flat = 0;
        while(flat<n*n){
            int nn = s.nextInt();
            temp.add(nn);
            flat+=nn;
        }
        int index = 0;
        for(int i=0;i<temp.size();i++){
            int num = temp.get(i);
            if(i%2==0){
                for(int j=index;j<index+num;j++){
                    ans[j] = 0;
                }
                index += num;
            }else{
                for(int j=index;j<index+num;j++){
                    ans[j] = 1;
                }
                index += num;
            }
        }
        for(int i=0;i<n*n;i++){
            System.out.print(ans[i]);
            if(i!=0&&(i+1)%n==0) System.out.println();
        }
    }
}
